﻿using Newtonsoft.Json;
using System.Collections.Generic;

namespace ZH.GPT.Domains.Completions.Request
{
    /// <summary>
    /// 发送消息传入参数
    /// </summary>
    public class CompletionsQDTO
    {
        /// <summary>
        /// 机器人模型
        /// </summary>
        public string model { get; set; }
        /// <summary>
        /// 用户id
        /// </summary>
        public string UserId { get; set; }
        /// <summary>
        /// 聊天
        /// </summary>
        public string ChatId { get; set; }
        /// <summary>
        /// 消息内容
        /// </summary>
        public List<MessagesQDTO> messages { get; set; }

        /// <summary>
        /// ToString
        /// </summary>
        /// <returns></returns>
        public override string ToString() => JsonConvert.SerializeObject(this);
    }

    /// <summary>
    /// 发送的消息体
    /// </summary>
    public class MessagesQDTO
    {
        /// <summary>
        /// 消息类型
        /// </summary>
        public string role { get; set; }

        /// <summary>
        /// 消息内容
        /// </summary>
        public string content { get; set; }

        /// <summary>
        /// ToString
        /// </summary>
        /// <returns></returns>
        public override string ToString() => JsonConvert.SerializeObject(this);
    }
}
